package pl.edu.wsinf.lukaszwalczak.emailclient.repository;

import java.util.List;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import pl.edu.wsinf.lukaszwalczak.emailclient.pojo.Account;
import pl.edu.wsinf.lukaszwalczak.emailclient.pojo.Mail;

@Repository
public interface MailRepository extends JpaRepository<Mail, Long> {
    
    public List<Mail> findByAccount(Account account);
    public List<Mail> findByFolder(String folder, Sort sort);
    public Mail findByAccountAndMessageID(Account account, String messageID);
}
